/*******************************************************************************
 * Simple C-K Editor
 * 
 * Copyright (C) 2009 Ingi BROWN - Centre de Gestion Scientifique - Ecole des Mines ParisTech
 * Licensed under the GNU General Public License Version 3.
 * 
 * Simple C-K Editor includes source code and libraries from the JUNG Project (Java Universal Network/Graph Framework) 
 * released under the BSD license. Copyright (c) 2003-2004,  Regents of the University of California and the JUNG Project.
 * 
 * See the License.txt file for more details.
 ******************************************************************************/

package edu.ensmp.ckEditor.ckModel;

import java.awt.geom.Point2D;
import java.io.Serializable;

import edu.ensmp.ckEditor.main.Launcher;


/**
 * Defines concept and knowledge classes - used by JUNG as vertices of the
 * graphs For the moment, Concepts and Knowledge are defined identically, with 2
 * private variables: an index and a proposition. This will evolve in the
 * future, as the need for a more precise implementation of the C-K Theory will
 * be needed.
 */
public class CKModel {
	/** Creates a new instance of CKModel */
	public CKModel() {
	}

	/** Concept class */
	@SuppressWarnings("serial")
	public static class Concept implements Serializable {
		private int index;
		private String proposition;

		/**
		 * Constructors
		 * 
		 * @param id
		 * @param proposition
		 */
		public Concept(int id, String proposition) {
			this.index = id;
			this.proposition = proposition;

		}

		public Concept(int id) {
			this.index = id;
			this.proposition = null;
		}

		/** Getters and Setters */
		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}

		public String getProposition() {
			return this.proposition;
		}

		public void setProposition(String proposition) {
			this.proposition = proposition;
		}

		/** toString method - widely used with JUNG */
		@Override
		public String toString() {
			return "C" + index + "-" + proposition;
		}
	}

	/** Knowledge class */
	public static class Knowledge {
		private int index;
		private String proposition;

		/**
		 * Constructors
		 * 
		 * @param id
		 * @param proposition
		 */
		public Knowledge(int id, String proposition) {
			this.index = id;
			this.proposition = proposition;
		}

		public Knowledge(int id) {
			this.index = id;
			this.proposition = null;
		}

		/** Getters and Setters */
		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}

		public String getProposition() {
			return this.proposition;
		}

		public void setProposition(String proposition) {
			this.proposition = proposition;
		}

		/** toString method - widely used with JUNG */
		@Override
		public String toString() {
			return "K" + index + "-" + proposition;
		}
	}

	/**
	 * The Partition class is used for the Edges in Concept Graphs. The
	 * Partition class is *very* poor for the moment, for we do not need any
	 * precise implementation. A future evolution of this code will implement
	 * Partitions more precisely by adding interesting attributes.
	 */
	public static class Partition {

	}

	/**
	 * The KnowledgeLink class is used for the Edges in Knowledge Graphs. The
	 * KnowledgeLink class is *very* poor for the moment, for we do not need any
	 * precise implementation. A future evolution of this code will implement
	 * KnowledgeLink more precisely by adding interesting attributes.
	 */
	public static class KnowledgeLink {

	}

}
